package com.easyweb.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.easyweb.dao.BaseDao;
import com.easyweb.dao.NavBarDao;
import com.easyweb.model.NavBar;
@Repository
public class NavBarDaoImpl extends BaseDao implements NavBarDao{

	public int insertNavBar(NavBar navBar) {
		return getSqlSession().insert("navbar.insertNavBar",navBar);
	}

	public int deleteNavBarById(Map<String, Object> map) {
		return getSqlSession().delete("navbar.deleteNavBarById", map);
	}

	public int updateNavBar(NavBar navBar) {
		return getSqlSession().update("navbar.updateNavBarById", navBar);
	}

	public List<NavBar> getNavBars(Map<String, Object> map) {
		return getSqlSession().selectList("navbar.selectNavBars", map);
	}

	public NavBar getNavBarById(Map<String, Object> map) {
		return getSqlSession().selectOne("navbar.selectNavBars", map);
	}

	public int getNavBarCount(Map<String, Object> map) {
		return getSqlSession().selectOne("navbar.selectNavBarsCount", map);
	}

	public int selectMaxSortNum() {
		return getSqlSession().selectOne("navbar.selectMaxSortNum", null);
	}

}
